package com.huanzhidadi.rollback.model;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class UserVO implements Serializable {

    @NotBlank(message = "用户姓名不能为空")
    private String name;

    @NotNull(message = "年龄不能为空")
    @Min(value = 10, message = "年龄不能低于10岁")
    @Max(value = 100, message = "年龄不能高于100岁")
    private Integer age;

    @NotBlank(message = "地址不能为空")
    private String addr;
}
